<template>
<h1>事件绑定练习</h1>
  <button @click="f">按钮1</button>
  <button v-on:click="f">按钮2</button>

  <h3>敲回车事件</h3>
  <input type="text" placeholder="请输入你想要搜索的商品" v-model="se" @keyup.enter="f"></input>
</template>
<script setup>
import {ref} from "vue";

const se =ref('');

const f = () => {
  console.log(se.value);
}
</script>


<style scoped>

</style>